package _31define;

public class Triple <T,E,V>{
     T a;
     E b;
     V v;

    public Triple(T a, E b, V v) {
        this.a = a;
        this.b = b;
        this.v = v;
    }

    public T getA() {
        return a;
    }

    public E getB() {
        return b;
    }

    public V getV() {
        return v;
    }
}
class X{
    public void sleeping() {
        System.out.println("x is sleeping");
    }
}
class Y{
    public void sleeping() {
        System.out.println("y is sleeping");
    }
}
class Z{
    public void sleeping() {
        System.out.println("z is sleeping");
    }
}
class Tset1{
    public static void main(String[] args) {
        Triple<X,Y,Z> triple=new Triple<>(new X(),new Y(),new Z());
        triple.getA().sleeping();
        triple.getB().sleeping();
        triple.getV().sleeping();
    }
}
